package com.yihuan.service;

import com.yihuan.entity.PlaintEntity;
import com.yihuan.mapper.PlaintMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Author:梦醒
 * Date: 2022/4/27 16:52
 * Dream:
 * 信言不美，美言不信。
 * 善者不辩，辩者不善。
 * 知者不博，博者不知。
 * Function:
 */
@Service
public class PlaintService {
    @Resource
    PlaintMapper plaintMapper;
    
    /**
     * 登记评论信息
     *
     * @param plaintEntity
     * @return
     */
    public int insertPlaintByPlaintData(PlaintEntity plaintEntity) {
        return plaintMapper.insertPlaintByPlaintData(plaintEntity);
    }
    
    /**
     * 分页查询数据
     *
     * @param plaintEntity
     * @return
     */
    public List<PlaintEntity> findPlaintByPlaintList(PlaintEntity plaintEntity) {
        return plaintMapper.findPlaintByPlaintList(plaintEntity);
    }
    
    /**
     * 统计分页查询数据
     *
     * @param plaintEntity
     * @return
     */
    public int countPlaintList(PlaintEntity plaintEntity) {
        return plaintMapper.countPlaintList(plaintEntity);
    }
    
    /**
     * 统计留言数据
     *
     * @param plaintEntity
     * @return
     */
    public int sumPlaintListByCompID(PlaintEntity plaintEntity) {
        return plaintMapper.sumPlaintListByCompID(plaintEntity);
    }
    
    /**
     * 统计留言数据
     *
     * @param plaintEntity
     * @return
     */
    public int sumPlaintList(PlaintEntity plaintEntity) {
        return plaintMapper.sumPlaintList(plaintEntity);
    }
    
    
}
